package com.wn.servlet.demo01;

import javax.servlet.GenericServlet;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author yellow Docter
 * @date 2022 -06-28
 * @desc
 *
 *  servlet的开发方式3:
 *
 *  01 可以继承  HttpServlet (必须掌握 )
 *  02 重写 doget/dopost
 *  03 doget  处理get请求
 *     dopost 处理post请求
 *     2个方法写一个就可以,另外一个方法调用就可以
 *
 *
 */
@WebServlet(urlPatterns = "/demo03")
public class Demo03Servlet extends HttpServlet {

    // 写出来请求
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        this.doGet(req, resp);
    }


}
